package com.newsee.remote.sapcenter.controller;

import com.alibaba.fastjson.JSONObject;
import com.newsee.remote.common.dto.sapcenter.companycode.CompanyCodeDTO;
import com.newsee.remote.common.dto.sapcenter.organization.OrganizationDTO;
import com.newsee.remote.common.vo.costcenter.CostCenterVO;
import com.newsee.remote.sapcenter.service.IShSapcostcenterService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author liangzhi.chen
 * @description 公司代码
 * @date 2019/11/14 下午 02:07
 **/
@Slf4j
@RestController
@RequestMapping("/sap/company/code")
public class CompanyCodeController {

    @Autowired
    private IShSapcostcenterService iShSapcostcenterService;

    @ApiOperation(value = "接收公司代码接口")
    @PostMapping
    public CostCenterVO acceptCompanyCode(@RequestBody CompanyCodeDTO dto) {
        log.info("接收公司代码接口信息：" + dto.toString());
        return iShSapcostcenterService.acceptCompanyCode(dto);
    }


}
